package com.chainyoung.component_tmperson.api;

import com.chainyoung.common.appcommon.entity.CommonList;
import com.chainyoung.common.appcommon.entity.RecieveAccount;
import com.chainyoung.common.appcommon.entity.UploadFile;
import com.chainyoung.common.appcommon.entity.Version;
import com.chainyoung.common.base.BaseResponse;
import com.chainyoung.common.bean.UserInfo;
import com.chainyoung.component_tmperson.constant.PersonServerContant;
import com.chainyoung.component_tmperson.entity.Bank;
import com.chainyoung.component_tmperson.entity.BookMark;
import com.chainyoung.component_tmperson.entity.CheckBookMarkResult;
import com.chainyoung.component_tmperson.entity.CoinItem;
import com.chainyoung.component_tmperson.entity.DebitRepay;
import com.chainyoung.component_tmperson.entity.InviteFriend;
import com.chainyoung.component_tmperson.entity.MyTotalAsset;
import com.chainyoung.component_tmperson.entity.OwnDebitDetail;
import com.chainyoung.component_tmperson.entity.OwnWalletDebit;
import com.chainyoung.component_tmperson.entity.PreRepayment;
import com.chainyoung.component_tmperson.entity.Purse;
import com.chainyoung.component_tmperson.entity.PurseAddr;
import com.chainyoung.component_tmperson.entity.PurseAddrItem;
import com.chainyoung.component_tmperson.entity.RechargeRecord;
import com.chainyoung.component_tmperson.entity.Reward;
import com.chainyoung.component_tmperson.entity.WalletDebit;
import com.chainyoung.component_tmperson.entity.WalletFinancing;
import com.chainyoung.component_tmperson.entity.WalletFinancingOwn;
import com.chainyoung.component_tmperson.entity.WalletProfiRecord;
import com.chainyoung.component_tmperson.entity.WalletRepayment;


import java.util.List;
import java.util.Map;
import java.util.TreeMap;

import io.reactivex.Flowable;
import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import retrofit2.http.Body;
import retrofit2.http.Field;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.PartMap;

public interface PersonService {

    @FormUrlEncoded
    @POST(PersonServerContant.MY_PURSE)
    Flowable<BaseResponse<CommonList<Purse>>> getMyPurse(@FieldMap TreeMap<String, Object> map);

    @FormUrlEncoded
    @POST(PersonServerContant.PURSE_ADDR)
    Flowable<BaseResponse<PurseAddr>> getPurseAddr(@FieldMap TreeMap<String, Object> map);

    @FormUrlEncoded
    @POST(PersonServerContant.RECHARGE_RECORD)
    Flowable<BaseResponse<CommonList<RechargeRecord>>> getRechargeRecord(@FieldMap TreeMap<String, Object> map);

    @FormUrlEncoded
    @POST(PersonServerContant.CASH_RECORD)
    Flowable<BaseResponse<CommonList<RechargeRecord>>> getCashRecord(@FieldMap TreeMap<String, Object> map);

    @FormUrlEncoded
    @POST(PersonServerContant.WITHDRAW)
    Flowable<BaseResponse<String>> withDraw(@FieldMap TreeMap<String, Object> map);

    @FormUrlEncoded
    @POST(PersonServerContant.SEND_CODE)
    Flowable<BaseResponse<String>> sendCode(@FieldMap TreeMap<String, Object> map);

    @FormUrlEncoded
    @POST(PersonServerContant.GET_USER_INFO)
    Flowable<BaseResponse<UserInfo>> getUserInfo(@FieldMap TreeMap<String, Object> map);


    @FormUrlEncoded
    @POST(PersonServerContant.GET_RECIEVE_ACCOUNT)
    Flowable<BaseResponse<RecieveAccount>> getRecieveAccount(@FieldMap TreeMap<String, Object> map);


    @FormUrlEncoded
    @POST(PersonServerContant.SET_RECIEVE_ACCOUNT)
    Flowable<BaseResponse<String>> setRecieveAccount(@FieldMap TreeMap<String, Object> map);


    @FormUrlEncoded
    @POST(PersonServerContant.UPDATE_USER_INFO)
    Flowable<BaseResponse<UserInfo>> updateUserInfo(@FieldMap TreeMap<String, Object> map);


    @FormUrlEncoded
    @POST(PersonServerContant.SET_RECIEVE_ACCOUNT_OPNE)
    Flowable<BaseResponse<String>> setAccountOpen(@FieldMap TreeMap<String, Object> map);


    @FormUrlEncoded
    @POST(PersonServerContant.GET_RECIEVE_ACCOUNT_LIST)
    Flowable<BaseResponse<List<RecieveAccount>>> getRecieveAccountList(@FieldMap TreeMap<String, Object> map);


    @POST(PersonServerContant.GET_BANKS)
    Flowable<BaseResponse<List<Bank>>> getBanks();

    @FormUrlEncoded
    @POST(PersonServerContant.GET_MY_TOTAL_ASSET)
    Flowable<BaseResponse<MyTotalAsset>> getTotalAsset(@FieldMap TreeMap<String, Object> map);


    @POST(PersonServerContant.UP_LOAD_IMG)
    Flowable<BaseResponse<UploadFile>> upLoadImage(@Body RequestBody params);


    @FormUrlEncoded
    @POST(PersonServerContant.UPDATE_PASSWORD)
    Flowable<BaseResponse<String>> updatePwd(@FieldMap TreeMap<String, Object> map);


    @FormUrlEncoded
    @POST(PersonServerContant.INVITE_FRIEND)
    Flowable<BaseResponse<InviteFriend>> inviteFriend(@FieldMap TreeMap<String, Object> map);

    @FormUrlEncoded
    @POST(PersonServerContant.FEED_BACK)
    Flowable<BaseResponse<String>> feedBack(@FieldMap TreeMap<String, Object> map);

    @FormUrlEncoded
    @POST(PersonServerContant.GET_COIN_LIST)
    Flowable<BaseResponse<List<CoinItem>>> getCoinList(@FieldMap TreeMap<String, Object> map);

    @FormUrlEncoded
    @POST(PersonServerContant.SELECT_COIN)
    Flowable<BaseResponse<String>> selectCoin(@FieldMap TreeMap<String, Object> map);

    @FormUrlEncoded
    @POST(PersonServerContant.GET_PURSEADDR_LIST)
    Flowable<BaseResponse<CommonList<PurseAddrItem>>> getPurseAddrList(@FieldMap TreeMap<String, Object> map);

    @FormUrlEncoded
    @POST(PersonServerContant.ADD_PURSE_ADDR)
    Flowable<BaseResponse<String>> addPurseAddr(@FieldMap TreeMap<String, Object> map);

    @FormUrlEncoded
    @POST(PersonServerContant.DEL_PURSE_ADDR)
    Flowable<BaseResponse<String>> delPurseAddr(@FieldMap TreeMap<String, Object> map);


    @POST(PersonServerContant.GET_PROTOCOL)
    Flowable<BaseResponse<String>> getProtocol();

    @FormUrlEncoded
    @POST(PersonServerContant.GET_TRANSFER_LOG)
    Flowable<BaseResponse<CommonList<RechargeRecord>>> getTransferRecord(@FieldMap TreeMap<String, Object> map);


    @POST(PersonServerContant.CHECK_UPDATE)
    Flowable<BaseResponse<Version>> checkUpdate();


    @FormUrlEncoded
    @POST(PersonServerContant.GET_BOOKMARK_LIST)
    Flowable<BaseResponse<List<BookMark>>> getBookmarkList(@FieldMap TreeMap<String, Object> map);

    @FormUrlEncoded
    @POST(PersonServerContant.MODIFY_BOOKMARK)
    Flowable<BaseResponse<List<BookMark>>> modifyBookmark(@FieldMap TreeMap<String, Object> map);

    @FormUrlEncoded
    @POST(PersonServerContant.DEl_BOOKMARK)
    Flowable<BaseResponse<List<BookMark>>> delBookmark(@FieldMap TreeMap<String, Object> map);

    @FormUrlEncoded
    @POST(PersonServerContant.ADD_BOOK_MARK)
    Flowable<BaseResponse<List<BookMark>>> addBookmark(@FieldMap TreeMap<String, Object> map);

    @FormUrlEncoded
    @POST(PersonServerContant.CHECK_BOOKMARK_EXSIST)
    Flowable<BaseResponse<CheckBookMarkResult>> checkBookmarkExsit(@FieldMap TreeMap<String, Object> map);

    @FormUrlEncoded
    @POST(PersonServerContant.GET_FINANCING_LIST)
    Flowable<BaseResponse<List<WalletFinancing>>> getFinancingList(@FieldMap TreeMap<String, Object> map);

    @FormUrlEncoded
    @POST(PersonServerContant.GET_USER_FINANCING_PROFIT)
    Flowable<BaseResponse<WalletFinancingOwn>> getUserFinancingProfit(@FieldMap TreeMap<String, Object> map);

    @FormUrlEncoded
    @POST(PersonServerContant.WALLET_FIANANCING_TURN_IN)
    Flowable<BaseResponse<String>> turnIn(@FieldMap TreeMap<String, Object> map);


    @FormUrlEncoded
    @POST(PersonServerContant.WALLET_FIANANCING_TURN_OUT)
    Flowable<BaseResponse<String>> turnOut(@FieldMap TreeMap<String, Object> map);

    @FormUrlEncoded
    @POST(PersonServerContant.GET_FINANCING_PROFIT_LIST)
    Flowable<BaseResponse<CommonList<WalletProfiRecord>>> getFinancingProfitList(@FieldMap TreeMap<String, Object> map);

    @FormUrlEncoded
    @POST(PersonServerContant.GET_WALLET_DEBIT_PROS)
    Flowable<BaseResponse<List<WalletDebit>>> getWalletDebitPros(@FieldMap TreeMap<String, Object> map);

    @FormUrlEncoded
    @POST(PersonServerContant.GET_DEBIT_PERIODS)
    Flowable<BaseResponse<List<WalletDebit>>> getWalletDebitPeriods(@FieldMap TreeMap<String, Object> map);


    @FormUrlEncoded
    @POST(PersonServerContant.GET_DEBIT_CREDIT)
    Flowable<BaseResponse<String>> getDebitCredit(@FieldMap TreeMap<String, Object> map);

    @FormUrlEncoded
    @POST(PersonServerContant.APPLY_DEBIT)
    Flowable<BaseResponse<String>> applyDebit(@FieldMap TreeMap<String, Object> map);


    @FormUrlEncoded
    @POST(PersonServerContant.GET_REPAYMENT_SCHEDULES)
    Flowable<BaseResponse<List<WalletRepayment>>> getRepaymentSchedules(@FieldMap TreeMap<String, Object> map);


    @POST(PersonServerContant.GET_PURPOSE_LIST)
    Flowable<BaseResponse<List<String>>> getPurposeList();


    @FormUrlEncoded
    @POST(PersonServerContant.GET_OWN_DEBIT_LIST)
    Flowable<BaseResponse<OwnWalletDebit>> getOwnDebitList(@FieldMap TreeMap<String, Object> map);

    @FormUrlEncoded
    @POST(PersonServerContant.GET_OWN_DEBIT_DETAIL)
    Flowable<BaseResponse<OwnDebitDetail>> getOwnDebitDetail(@FieldMap TreeMap<String, Object> map);


    @FormUrlEncoded
    @POST(PersonServerContant.GET_REPAY_RECORD)
    Flowable<BaseResponse<DebitRepay>> getDebitRepayRecord(@FieldMap TreeMap<String, Object> map);


    @FormUrlEncoded
    @POST(PersonServerContant.GET_DEBIT_PREPAYMENT_INFO)
    Flowable<BaseResponse<PreRepayment>> getPreRepayment(@FieldMap TreeMap<String, Object> map);

    @FormUrlEncoded
    @POST(PersonServerContant.CONFIRM_REPAY)
    Flowable<BaseResponse<String>> confirmRepay(@FieldMap TreeMap<String, Object> map);

    @FormUrlEncoded
    @POST(PersonServerContant.GET_DEBIT_CONTRACT)
    Flowable<BaseResponse<String>> getDebitContract(@FieldMap TreeMap<String, Object> map);

    @FormUrlEncoded
    @POST(PersonServerContant.GET_FINANCE_REWARD)
    Flowable<BaseResponse<CommonList<Reward>>> getReward(@FieldMap TreeMap<String, Object> map);


    @POST(PersonServerContant.GET_TOKEN_NAME)
    Flowable<ResponseBody> getTokenNames();


}
